package com.jysz.certificate.persistence.model.cm;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang.StringUtils;

import com.jysz.webcore.ssh.entity.AbstractBaseEntity;

/**
 * 合格证对象
 * @author <a href="mailto:javaengine@outlook.com">Kaca Rich</a>
 *
 */
@Entity
@Table(name = "cm_record_return")
@org.hibernate.annotations.Entity
public class RecordReturn  extends AbstractBaseEntity<Long>  {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String certificationNum;//合格证号
	private String chassis;// 车架号
	private Date leaveDate;//释放时间
	private Date returnDate;//回库时间
	private Long cerId;//回库合格证ID
	private String user;
	private String remark;
	
	@Column(name = "_user")
	public String getUser() {
		return user;
	}
	public void setUser(String user) {
		this.user = user;
	}
	@Column(name = "_cerId")
	public Long getCerId() {
		return cerId;
	}
	public void setCerId(Long cerId) {
		this.cerId = cerId;
	}
	@Column(name = "_returnDate")
	public Date getReturnDate() {
		return returnDate;
	}
	public void setReturnDate(Date returnDate) {
		this.returnDate = returnDate;
	}
	@Column(name = "_certificationNum", unique = true,columnDefinition="varchar(255)")
	public String getCertificationNum() {
		return certificationNum;
	}
	public void setCertificationNum(String certificationNum) {
		if(StringUtils.isNotBlank(certificationNum))
			certificationNum = certificationNum.toUpperCase();
		this.certificationNum = certificationNum;
	}
	@Column(name = "_chassis", nullable = false, unique = true,columnDefinition="varchar(255)")
	public String getChassis() {
		return chassis;
	}
	public void setChassis(String chassis) {
		if(StringUtils.isNotBlank(chassis))
			chassis = chassis.toUpperCase();
		this.chassis = chassis;
	}
	@Column(name = "_leaveDate")
	public Date getLeaveDate() {
		return leaveDate;
	}
	public void setLeaveDate(Date leaveDate) {
		this.leaveDate = leaveDate;
	}
	 
	@Column(name = "_remark")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}


	/**begin properties column constan**/
	public static final String ID = "id";
	/**end properties column constan**/

	

}
